package aa.jx.order.service;

import aa.jx.order.model.*;


import java.util.List;

public interface OrderService {
    Order createOrder(Integer userId, Integer addressId, List<OrderItem> cartItems);
    Order getOrderDetail(Long orderId);
    List<Order> getUserOrders(Integer userId);
    void updateOrderStatus(Long orderId, Integer status, String shippingCompany, String shippingNo);
    PaymentInfo createPayment(Long orderId);
    void processPayment(Long paymentId, boolean success);
    // 管理员获取订单详情
    Order getAdminOrderDetail(Long orderId);

    // 发货
    void shipOrder(Long orderId, String shippingCompany, String shippingNo);

    // 取消订单
    void cancelOrder(Long orderId);

    // 订单统计
    OrderStatistics getOrderStatistics(String startTime, String endTime);

    PageResult<Order> getAllOrders(String orderNo, Integer userId, Integer status,
                                   String startTime, String endTime,
                                   Integer page, Integer size);
}